#include <bits/stdc++.h>
using namespace std;

using ll = int64_t;
const int N = 20;
int n, t;
int a[N];

int main() {
    ios_base::sync_with_stdio(false), cin.tie(nullptr);
    cin >> t;
    while (t--) {
        cin >> n;
        int max_val = INT_MIN;  
        for (int i = 1; i <= n; ++i) {
            cin >> a[i];
            if (a[i] > max_val) {
                max_val = a[i];
            }
        }
        cout << max_val << '\n';
    }
    return 0;
}